package secondStage.part5.多线程.生产者消费者;

/**
 * @ClassName: [Producer]
 * @Description: 生产者类
 * @Author: [黄劲松]
 * @CreateDate: [2021-04-05]
 * @Version: [v1.0]
 */
public class Producer implements Runnable {
    private Box b;

    public Producer(Box b) {
        this.b = b;
    }

    @Override
    public void run() {
        for (int i = 1; i <= 30; i++) {
            b.put(i);
        }
    }
}
